using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cmc.Modbus.Base
{
    public  interface IBytesCmd
    {
        byte[] ReadCoilStatus(int start,int length, int id=0 , byte flag=0x01  );
        
        byte[] ReadInputStatus(int start, int length, int id = 0, byte flag = 0x01);
        
        byte[] ReadInputRegister(int start, int length, int id = 0, byte flag = 0x01);

        byte[] ReadHoldingRegister(int start, int length, int id = 0, byte flag = 0x01);
 
        byte[] WriteCoilStatus(int start, bool value,int length=1, int id = 0, byte flag = 0x01);
 
        byte[] WriteHoldingRegister(int start, int value, int length = 1, int id = 0, byte flag = 0x01);

        ReadDataBack ReciveDataHandle(string ip, int port, byte[] data,int startAddr);

    }
}
